<!--
  Copyright 2021 The Chromium Authors. All rights reserved.
  Use of this source code is governed by a BSD-style license that can be
  found in the LICENSE file.
-->
<!DOCTYPE html>
<html>

<head>
  <script>
    const portalUrl1 = new URL('cross-origin-portal.html', document.location).toString()
      .replace('localhost', 'devtools.xorigin.test');
    const portalUrl2 = new URL('cross-origin-portal-post.html', document.location).toString()
      .replace('localhost', 'devtools.xorigin.test');

    window.onload = () => {
      const xoriginportal1 = document.getElementById("x-origin-portal1");
      const xoriginportal2 = document.getElementById("x-origin-portal2");
      xoriginportal1.src = portalUrl1;
      xoriginportal2.src = portalUrl2;
      xoriginportal1.postMessage('test');
      xoriginportal2.postMessage('test');
    };
  </script>
</head>

<body>
  <portal id="x-origin-portal1"></portal>
  <portal id="x-origin-portal2"></portal>
</body>

</html>

